package com.zzh.partnersys.utils;

import java.util.UUID;

/**
 * @author zhangzhihao
 * @version 1.0
 * 生成用户的账号ID
 */
public class UserAccountUtils {

    public static int i = 0;

    /**
     * 生成用户的账户
     * @return 账户
     */
    public static String getUserAccountByTimeStamp(){
        long timestamp = System.currentTimeMillis();
        String timestampStr = timestamp + "";
        timestampStr = timestampStr.substring(0,10);//截取前10位作为时间戳
        timestampStr = timestampStr + i%10;
        i++;
        if (i >= 100){//不用一直加下去，防止int超出范围
            i=0;
        }
        return timestampStr;
    }
}
